﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using IronBrokers.InformationBroker.Model;

namespace IronBrokers.InformationBroker
{
    /// <summary>
    /// Interaction logic for StockWindow.xaml
    /// </summary>
    public partial class StockWindow : Window
    {
        private StockWindowViewModel vModel = null;

        public StockWindow(StockWindowViewModel viewModel)
        {
            InitializeComponent();
            this.vModel = viewModel;
            DataContext = viewModel;
        }

        private void OnSelectedItemChanged(object sender, RoutedPropertyChangedEventArgs<object> e)
        {
            vModel.SelectedNode = treeView1.SelectedItem as TreeNode;
        }
    }
}
